/*
能操作Education集合数据的Model
 */
// 1.引入mongoose
const mongoose = require('mongoose')

// 2.字义Schema(描述文档结构)
const educationSchema = new mongoose.Schema({
    title: {type: String, required: true},
    category: {type: String, required: true},
    time: Number,
    abstract: {},// 摘要
    container: {type: String}
})

// 3. 定义Model(与集合对应, 可以操作集合)
const EducationModel = mongoose.model('educations', educationSchema)

// 4. 向外暴露Model
module.exports = EducationModel
